package com.tyk.bookstore.front.payment.model.query;

import com.tyk.bookstore.front.common.core.model.constant.ValidateConstant;
import com.tyk.bookstore.front.common.core.model.enume.PaymentWay;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.*;
import lombok.Data;

/**
 * @author tyk
 * @description 订单支付参数
 */
@Data
public class OrderPayQuery {

    @Schema(description = "订单ID")
    @NotNull
    @Min(1)
    private Long orderId;

    @Schema(description = "订单编号")
    @NotBlank
    @Size(min = ValidateConstant.ORDER_NO_MIN_LENGTH, max = ValidateConstant.ORDER_NO_MAX_LENGTH)
    @Pattern(regexp = ValidateConstant.ORDER_NO_REGEXP)
    private String orderNo;


    @Schema(description = "支付方式")
    @NotNull
    private PaymentWay paymentWay;


    @Schema(description = "支付密码")
    @Size(min = ValidateConstant.PAY_PASSWORD_MIN_LENGTH, max = ValidateConstant.PAY_PASSWORD_MAX_LENGTH)
    @Pattern(regexp = ValidateConstant.PAY_PASSWORD_REGEXP)
    private String paymentPassword;

}
